﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract PutniNalogAkontacija typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class PutniNalogAkontacijaDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<PutniNalogAkontacijaDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.PutniNalogAkontacija _currentPutniNalogAkontacija = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxPutniNalogAkontacijaDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxPutniNalogAkontacijaErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxPutniNalogAkontacijaBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDPutniNalog property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDPutniNalogDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDValuta property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDValutaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IznosValuta property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIznosValutaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IznosKuna property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIznosKunaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Slovima property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxSlovimaDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDBlagajnaStavka property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDBlagajnaStavkaDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.BlagajnaStavka> _IDBlagajnaStavkaList;
		
		/// <summary> 
		/// The list of selectable BlagajnaStavka
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.BlagajnaStavka> IDBlagajnaStavkaList
		{
			get {return this._IDBlagajnaStavkaList;}
			set 
			{
				this._IDBlagajnaStavkaList = value;
				this.uxIDBlagajnaStavkaDataGridViewColumn.DataSource = null;
				this.uxIDBlagajnaStavkaDataGridViewColumn.DataSource = this._IDBlagajnaStavkaList;
			}
		}
		
		private bool _allowNewItemInIDBlagajnaStavkaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of BlagajnaStavka
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDBlagajnaStavkaList
		{
			get { return _allowNewItemInIDBlagajnaStavkaList;}
			set
			{
				this._allowNewItemInIDBlagajnaStavkaList = value;
				this.uxIDBlagajnaStavkaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.PutniNalog> _IDPutniNalogList;
		
		/// <summary> 
		/// The list of selectable PutniNalog
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.PutniNalog> IDPutniNalogList
		{
			get {return this._IDPutniNalogList;}
			set 
			{
				this._IDPutniNalogList = value;
				this.uxIDPutniNalogDataGridViewColumn.DataSource = null;
				this.uxIDPutniNalogDataGridViewColumn.DataSource = this._IDPutniNalogList;
			}
		}
		
		private bool _allowNewItemInIDPutniNalogList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of PutniNalog
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDPutniNalogList
		{
			get { return _allowNewItemInIDPutniNalogList;}
			set
			{
				this._allowNewItemInIDPutniNalogList = value;
				this.uxIDPutniNalogDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Valuta> _IDValutaList;
		
		/// <summary> 
		/// The list of selectable Valuta
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Valuta> IDValutaList
		{
			get {return this._IDValutaList;}
			set 
			{
				this._IDValutaList = value;
				this.uxIDValutaDataGridViewColumn.DataSource = null;
				this.uxIDValutaDataGridViewColumn.DataSource = this._IDValutaList;
			}
		}
		
		private bool _allowNewItemInIDValutaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Valuta
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDValutaList
		{
			get { return _allowNewItemInIDValutaList;}
			set
			{
				this._allowNewItemInIDValutaList = value;
				this.uxIDValutaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.PutniNalogAkontacija> _PutniNalogAkontacijaList;
				
		/// <summary> 
		/// The list of PutniNalogAkontacija to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.PutniNalogAkontacija> PutniNalogAkontacijaList
		{
			get {return this._PutniNalogAkontacijaList;}
			set
			{
				this._PutniNalogAkontacijaList = value;
				this.uxPutniNalogAkontacijaBindingSource.DataSource = null;
				this.uxPutniNalogAkontacijaBindingSource.DataSource = value;
				this.uxPutniNalogAkontacijaDataGridView.DataSource = null;
				this.uxPutniNalogAkontacijaDataGridView.DataSource = this.uxPutniNalogAkontacijaBindingSource;				
				//this.uxPutniNalogAkontacijaBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxPutniNalogAkontacijaBindingSource_ListChanged);
				this.uxPutniNalogAkontacijaBindingSource.CurrentItemChanged += new System.EventHandler(OnPutniNalogAkontacijaBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnPutniNalogAkontacijaBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentPutniNalogAkontacija = uxPutniNalogAkontacijaBindingSource.Current as Entities.PutniNalogAkontacija;
			
			if (_currentPutniNalogAkontacija != null)
			{
				_currentPutniNalogAkontacija.Validate();
			}
			//_PutniNalogAkontacija.Validate();
			OnCurrentEntityChanged();
		}

		//void uxPutniNalogAkontacijaBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.PutniNalogAkontacija"/> instance.
		/// </summary>
		public Entities.PutniNalogAkontacija SelectedPutniNalogAkontacija
		{
			get {return this._currentPutniNalogAkontacija;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxPutniNalogAkontacijaDataGridView.VirtualMode;}
			set
			{
				this.uxPutniNalogAkontacijaDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxPutniNalogAkontacijaDataGridView.AllowUserToAddRows;}
			set {this.uxPutniNalogAkontacijaDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxPutniNalogAkontacijaDataGridView.AllowUserToDeleteRows;}
			set {this.uxPutniNalogAkontacijaDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxPutniNalogAkontacijaDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxPutniNalogAkontacijaDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="PutniNalogAkontacijaDataGridViewBase"/> class.
		/// </summary>
		public PutniNalogAkontacijaDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxPutniNalogAkontacijaDataGridView = new System.Windows.Forms.DataGridView();
			this.uxPutniNalogAkontacijaBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxPutniNalogAkontacijaErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDPutniNalogDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDValutaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIznosValutaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIznosKunaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxSlovimaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDBlagajnaStavkaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			//this.uxIDBlagajnaStavkaBindingSource = new BlagajnaStavkaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDBlagajnaStavkaBindingSource)).BeginInit();
			//this.uxIDPutniNalogBindingSource = new PutniNalogBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDPutniNalogBindingSource)).BeginInit();
			//this.uxIDValutaBindingSource = new ValutaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDValutaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogAkontacijaDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogAkontacijaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogAkontacijaErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxPutniNalogAkontacijaErrorProvider
			// 
			this.uxPutniNalogAkontacijaErrorProvider.ContainerControl = this;
			this.uxPutniNalogAkontacijaErrorProvider.DataSource = this.uxPutniNalogAkontacijaBindingSource;						
			// 
			// uxPutniNalogAkontacijaDataGridView
			// 
			this.uxPutniNalogAkontacijaDataGridView.AutoGenerateColumns = false;
			this.uxPutniNalogAkontacijaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxPutniNalogAkontacijaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDPutniNalogDataGridViewColumn,
		this.uxIDValutaDataGridViewColumn,
		this.uxIznosValutaDataGridViewColumn,
		this.uxIznosKunaDataGridViewColumn,
		this.uxSlovimaDataGridViewColumn,
		this.uxIDBlagajnaStavkaDataGridViewColumn			});
			this.uxPutniNalogAkontacijaDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxPutniNalogAkontacijaDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxPutniNalogAkontacijaDataGridView.Name = "uxPutniNalogAkontacijaDataGridView";
			this.uxPutniNalogAkontacijaDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxPutniNalogAkontacijaDataGridView.TabIndex = 0;	
			this.uxPutniNalogAkontacijaDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxPutniNalogAkontacijaDataGridView.EnableHeadersVisualStyles = false;
			this.uxPutniNalogAkontacijaDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnPutniNalogAkontacijaDataGridViewDataError);
			this.uxPutniNalogAkontacijaDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnPutniNalogAkontacijaDataGridViewCellValueNeeded);
			this.uxPutniNalogAkontacijaDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnPutniNalogAkontacijaDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDPutniNalogDataGridViewColumn
			//
			this.uxIDPutniNalogDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDPutniNalogDataGridViewColumn.DataPropertyName = "IDPutniNalog";
			this.uxIDPutniNalogDataGridViewColumn.HeaderText = "IDPutniNalog";
			this.uxIDPutniNalogDataGridViewColumn.Name = "uxIDPutniNalogDataGridViewColumn";
			this.uxIDPutniNalogDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDPutniNalogDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDPutniNalogDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDValutaDataGridViewColumn
			//
			this.uxIDValutaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDValutaDataGridViewColumn.DataPropertyName = "IDValuta";
			this.uxIDValutaDataGridViewColumn.HeaderText = "IDValuta";
			this.uxIDValutaDataGridViewColumn.Name = "uxIDValutaDataGridViewColumn";
			this.uxIDValutaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDValutaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDValutaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIznosValutaDataGridViewColumn
			//
			this.uxIznosValutaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIznosValutaDataGridViewColumn.DataPropertyName = "IznosValuta";
			this.uxIznosValutaDataGridViewColumn.HeaderText = "IznosValuta";
			this.uxIznosValutaDataGridViewColumn.Name = "uxIznosValutaDataGridViewColumn";
			this.uxIznosValutaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIznosValutaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIznosValutaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIznosKunaDataGridViewColumn
			//
			this.uxIznosKunaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIznosKunaDataGridViewColumn.DataPropertyName = "IznosKuna";
			this.uxIznosKunaDataGridViewColumn.HeaderText = "IznosKuna";
			this.uxIznosKunaDataGridViewColumn.Name = "uxIznosKunaDataGridViewColumn";
			this.uxIznosKunaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIznosKunaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIznosKunaDataGridViewColumn.ReadOnly = false;		
			//
			// uxSlovimaDataGridViewColumn
			//
			this.uxSlovimaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxSlovimaDataGridViewColumn.DataPropertyName = "Slovima";
			this.uxSlovimaDataGridViewColumn.HeaderText = "Slovima";
			this.uxSlovimaDataGridViewColumn.Name = "uxSlovimaDataGridViewColumn";
			this.uxSlovimaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxSlovimaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxSlovimaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDBlagajnaStavkaDataGridViewColumn
			//
			this.uxIDBlagajnaStavkaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDBlagajnaStavkaDataGridViewColumn.DataPropertyName = "IDBlagajnaStavka";
			this.uxIDBlagajnaStavkaDataGridViewColumn.HeaderText = "IDBlagajnaStavka";
			this.uxIDBlagajnaStavkaDataGridViewColumn.Name = "uxIDBlagajnaStavkaDataGridViewColumn";
			this.uxIDBlagajnaStavkaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDBlagajnaStavkaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDBlagajnaStavkaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDBlagajnaStavkaDataGridViewColumn
			//				
			this.uxIDBlagajnaStavkaDataGridViewColumn.DisplayMember = "IDBlagajnaIzvjestaj";	
			this.uxIDBlagajnaStavkaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDBlagajnaStavkaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDBlagajnaStavkaDataGridViewColumn.DataSource = uxIDBlagajnaStavkaBindingSource;				
				
			//
			// uxIDPutniNalogDataGridViewColumn
			//				
			this.uxIDPutniNalogDataGridViewColumn.DisplayMember = "Oznaka";	
			this.uxIDPutniNalogDataGridViewColumn.ValueMember = "ID";	
			this.uxIDPutniNalogDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDPutniNalogDataGridViewColumn.DataSource = uxIDPutniNalogBindingSource;				
				
			//
			// uxIDValutaDataGridViewColumn
			//				
			this.uxIDValutaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDValutaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDValutaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDValutaDataGridViewColumn.DataSource = uxIDValutaBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxPutniNalogAkontacijaDataGridView);
			this.Name = "PutniNalogAkontacijaDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDBlagajnaStavkaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDPutniNalogBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDValutaBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogAkontacijaErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogAkontacijaDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxPutniNalogAkontacijaBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				PutniNalogAkontacijaDataGridViewEventArgs args = new PutniNalogAkontacijaDataGridViewEventArgs();
				args.PutniNalogAkontacija = _currentPutniNalogAkontacija;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class PutniNalogAkontacijaDataGridViewEventArgs : System.EventArgs
		{
			private Entities.PutniNalogAkontacija	_PutniNalogAkontacija;
	
			/// <summary>
			/// the  Entities.PutniNalogAkontacija instance.
			/// </summary>
			public Entities.PutniNalogAkontacija PutniNalogAkontacija
			{
				get { return _PutniNalogAkontacija; }
				set { _PutniNalogAkontacija = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxPutniNalogAkontacijaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnPutniNalogAkontacijaDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxPutniNalogAkontacijaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnPutniNalogAkontacijaDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxPutniNalogAkontacijaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].ID;
						break;
					case "uxIDPutniNalogDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].IDPutniNalog;
						break;
					case "uxIDValutaDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].IDValuta;
						break;
					case "uxIznosValutaDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].IznosValuta;
						break;
					case "uxIznosKunaDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].IznosKuna;
						break;
					case "uxSlovimaDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].Slovima;
						break;
					case "uxIDBlagajnaStavkaDataGridViewColumn":
						e.Value = PutniNalogAkontacijaList[e.RowIndex].IDBlagajnaStavka;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxPutniNalogAkontacijaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnPutniNalogAkontacijaDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxPutniNalogAkontacijaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDPutniNalogDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].IDPutniNalog = (System.Int32?)e.Value;
						break;
					case "uxIDValutaDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].IDValuta = (System.Int32?)e.Value;
						break;
					case "uxIznosValutaDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].IznosValuta = (System.Decimal?)e.Value;
						break;
					case "uxIznosKunaDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].IznosKuna = (System.Decimal?)e.Value;
						break;
					case "uxSlovimaDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].Slovima = (System.String)e.Value;
						break;
					case "uxIDBlagajnaStavkaDataGridViewColumn":
						PutniNalogAkontacijaList[e.RowIndex].IDBlagajnaStavka = (System.Int32?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
